#!/usr/bin/perl -w
use strict;

my $title;

while(<>){
  if(m/<title>(.+)<\/title>/gi){
    $title = $1;
  }
  if(m/\[\[([a-zA-Z0-9 ]+).*\]\]/g){
    printf("%s -> %s\n", $title, $1);
  }
}
